/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmAsnShrec extends BasicModel<PmAsnShrec> {
  ddate?: string; // 收货日期
  projectno?: string; // 工程编号
  projectname?: string; // 工程名称
  venname?: string; // 供应商
  asnno?: string; // 供货单号
  createByName?: string; // 收货人
  pmAsnShrecsList?: any[]; // 子表列表
}

export interface SrmAsn extends BasicModel<SrmAsn> {
  ddate?: string; // 供货日期
  projectno?: string; // 工程编号
  projectname?: string; // 工程名称
  venname?: string; // 供应商
  djno?: string; // 供货单号
  srmAsnList?: any[]; // 子表列表
}

export const pmAsnShrecList = (params?: PmAsnShrec | any) =>
  defHttp.get<PmAsnShrec>({ url: adminPath + '/material/receive/pmAsnShrec/list', params });

export const pmAsnShrecListData = (params?: PmAsnShrec | any) =>
  defHttp.post<Page<PmAsnShrec>>({ url: adminPath + '/material/receive/pmAsnShrec/listData', params });

export const pmAsnShrecForm = (params?: PmAsnShrec | any) =>
  defHttp.get<PmAsnShrec>({ url: adminPath + '/material/receive/pmAsnShrec/form', params });

export const pmAsnShrecSave = (params?: any, data?: PmAsnShrec | any) =>
  defHttp.postJson<PmAsnShrec>({ url: adminPath + '/material/receive/pmAsnShrec/save', params, data });

export const pmAsnShrecDelete = (params?: PmAsnShrec | any) =>
  defHttp.get<PmAsnShrec>({ url: adminPath + '/material/receive/pmAsnShrec/delete', params });


export const pmAsnShrecListAsnData = (params?: SrmAsn | any) =>
  defHttp.post<Page<SrmAsn>>({ url: adminPath + '/material/receive/pmAsnShrec/listAsnData', params });

export const pmAsnShrecAsnform = (params?: SrmAsn | any) =>
  defHttp.get<SrmAsn>({ url: adminPath + '/material/receive/pmAsnShrec/asnform', params });

export const pmAsnShrecSaveByAsn = (params?: any, data?: SrmAsn | any) =>
  defHttp.postJson<SrmAsn>({ url: adminPath + '/material/receive/pmAsnShrec/saveByAsn', params, data });